import React,{Component} from 'react'
import {View,Image,ScrollView, RichText} from '@tarojs/components'
import Taro from '@tarojs/taro'
import './contents.less'
import {AtDivider} from "taro-ui";

class Contents extends Component{

  state={

  }
   toDetail(){
    Taro.navigateTo({
      url: 'details/details'
    })
  }

  render(){
    return(
      <ScrollView className="contentList" >
        <View className="contentItem" onClick={this.toDetail.bind(this)}>
          <View className="imgView">
            <Image src=''>这是图片</Image>
          </View>
          <View className="contentView">
            <View className="titleView">
                <View className="itemTitle">这是标题</View>
                <View className="createTime">这是时间</View>
            </View>
            <RichText nodes="这是内容" className="describe"></RichText>
          </View>
        </View>
        <AtDivider content='没有更多了' fontColor='#2d8cf0' lineColor='#2d8cf0' />
      </ScrollView>
    )
  }
}

export default Contents
